package server

import (
	"encoding/json"
	"net/http"
)

func jsonError(w http.ResponseWriter, statusCode int, errType string, msg string) {
	w.WriteHeader(statusCode)
	json.NewEncoder(w).Encode(map[string]interface{}{
		"errType":       errType,
		"msg":           msg,
		"error_message": msg,
	})
}
